import { createRouter, createWebHistory, RouteRecordRaw } from "vue-router";
import DiscoverMusic from '../view/discoverMusic/index.vue'
import Podcast from '../view/podcast/index.vue'
import Video from '../view/video/index.vue'
import Attention from '../view/attention/index.vue'
import LiveBroadcast from '../view/liveBroadcast/index.vue'
import PrivateFM from '../view/privateFM/index.vue'
import Personality from '../view/personality/index.vue'
import Customization from '../view/customization/index.vue'
import SongList from '../view/songlist/index.vue'
import Ranking from '../view/ranking/index.vue'
import Singer from '../view/singer/index.vue'
import LatestMusic from '../view/latestMusic/index.vue'
import DailySongRecom from '../view/dailySongRecom/index.vue'
import SongListDetail from '../view/songListDetail/index.vue'
import SongDetailList from '../view/songListDetail/songDetailList/index.vue'
import SongDetailComment from '../view/songListDetail/songDetailComment/index.vue'
import Collector from '../view/songListDetail/collector/index.vue'
import MoreHotComment from '../view/moreHotComment/index.vue'
import UserDetail from '../view/userDetail/index.vue'
import UserDynamic from '../view/userDynamic/index.vue'
import UserPayAttention from '../view/userPayAttention/index.vue'
import CreateSongList from '../view/userDetail/createSongList/index.vue'
import CollectSongList from '../view/userDetail/collectSongList/index.vue'
import CollectPodcast from '../view/userDetail/collectPodcast/index.vue'
import MusicColumn from '../view/userDetail/musicColumn/index.vue'
import ListenMusicHistory from '../view/listenMusicHistory/index.vue'
import LastWeek from '../view/listenMusicHistory/lastWeek/index.vue'
import AllHistory from '../view/listenMusicHistory/allHistory/index.vue'
import MVDetail from '../view/MVDetail/index.vue'
import BestPlaylist from '../view/bestPlaylist/index.vue'
import SingerDetail from '../view/SingerDetail/index.vue'
import Album from '../view/SingerDetail/Album/index.vue'
import MV from '../view/SingerDetail/MV/index.vue'
import SingerDetailChild from '../view/SingerDetail/SingerDetail/index.vue'
import SimilarSinger from '../view/SingerDetail/SimilarSinger/index.vue'
import AlbumDetail from '../view/AlbumDetail/index.vue'
import AlbumSongList from '../view/AlbumDetail/SongList/index.vue'
import AlbumComment from '../view/AlbumDetail/Comment/index.vue'
import AlbumDetailDesc from '../view/AlbumDetail/AlbumDetail/index.vue'
import NewSong from '../view/latestMusic/NewSong/index.vue'
import NewCD from '../view/latestMusic/newCD/index.vue'
import ChildVideo from '../view/video/childVideo/index.vue'
import ChildMV from '../view/video/childMV/index.vue'
import VideoDetail from '../view/VideoDetail/index.vue'
import MVRanking from '../view/MVRanking/index.vue'
import AllMV from '../view/AllMV/index.vue'
import Search from '../view/search/index.vue'
import Single from '../view/search/single/index.vue'
import Singer_Search from '../view/search/singer/index.vue'
import Album_Search from '../view/search/album/index.vue'
import Video_Search from '../view/search/video/index.vue'
import SongList_Search from '../view/search/songList/index.vue'
import Lyric_Search from '../view/search/lyric/index.vue'
import Podcast_Search from '../view/search/podcast/index.vue'
import Sound from '../view/search/sound/index.vue'
import User from '../view/search/user/index.vue'

const routes: RouteRecordRaw[] = [
    {
        path: "/",
        component: DiscoverMusic,
        children: [
            {
                path: "/",
                name: "personality",
                component: Personality
            },
            {
                path: "/Customization",
                name: "customization",
                component: Customization
            },
            {
                path: "/SongList",
                name: "songList",
                component: SongList
            },
            {
                path: "/Ranking",
                name: "ranking",
                component: Ranking
            },
            {
                path: "/Singer",
                name: "singer",
                component: Singer
            },
            {
                path: "/LatestMusic",
                name: "latestMusic",
                component: LatestMusic,
                children: [
                    {
                        path: "/LatestMusic",
                        name: "newSong",
                        component: NewSong
                    },
                    {
                        path: "/NewCD",
                        name: "newCD",
                        component: NewCD
                    }
                ]
            }
        ]
    },
    {
        path: "/Podcast",
        component: Podcast
    },
    {
        path: "/Video",
        component: Video,
        children: [
            {
                path: "/Video",
                name: "childVideo",
                component: ChildVideo
            },
            {
                path: "/ChildMV",
                name: "childMV",
                component: ChildMV
            }
        ]
    },
    {
        path: "/Attention",
        component: Attention
    },
    {
        path: "/LiveBroadcast",
        component: LiveBroadcast
    },
    {
        path: "/PrivateFM",
        component: PrivateFM
    },
    {
        path: "/DailySongRecom",
        component: DailySongRecom
    },
    {
        path: "/SongListDetail/:id",
        component: SongListDetail,
        children: [
            {
                path: "/SongListDetail/:id",
                name: "songDetailList",
                component: SongDetailList,
            },
            {
                path: "/SongListDetail/SongDetailComment",
                name: "SongDetailComment",
                component: SongDetailComment,
            },
            {
                path: "/SongListDetail/Collector",
                name: "Collector",
                component: Collector,
            }
        ]
    },
    {
        path: "/MoreHotComment",
        component: MoreHotComment
    },
    {
        path: "/userDetail",
        component: UserDetail,
        children: [
            {
                path: "/userDetail",
                name: "createSongList",
                component: CreateSongList
            },
            {
                path: "/userDetail/CollectSongList",
                name: "collectSongList",
                component: CollectSongList
            },
            {
                path: "/userDetail/CollectPodcast",
                name: "collectPodcast",
                component: CollectPodcast
            },
            {
                path: "/userDetail/MusicColumn",
                name: "musicColumn",
                component: MusicColumn
            }
        ]
    },
    {
        path: "/UserDynamic",
        component: UserDynamic
    },
    {
        path: "/UserPayAttention",
        component: UserPayAttention
    },
    {
        path: "/ListenMusicHistory",
        component: ListenMusicHistory,
        children: [
            {
                path: "/ListenMusicHistory",
                name: "lastWeek",
                component: LastWeek
            },
            {
                path: "/ListenMusicHistory/AllHistory",
                name: "allHistory",
                component: AllHistory
            }
        ]
    },
    {
        path: "/MVDetail/:id",
        component: MVDetail
    },
    {
        path: "/BestPlaylist",
        component: BestPlaylist
    },
    {
        path: "/SingerDetail/:id",
        component: SingerDetail,
        children: [
            {
                path: "/SingerDetail/:id",
                name: "album",
                component: Album
            },
            {
                path: "/SingerDetail/MV",
                name: "mv",
                component: MV
            },
            {
                path: "/SingerDetail/SingerDetailChild",
                name: "singerDetailChild",
                component: SingerDetailChild
            },
            {
                path: "/SingerDetail/SimilarSinger",
                name: "similarSinger",
                component: SimilarSinger
            }
        ]
    },
    {
        path: "/AlbumDetail/:id",
        component: AlbumDetail,
        children: [
            {
                path: "/AlbumDetail/:id",
                name: "albumSongList",
                component: AlbumSongList
            },
            {
                path: "/AlbumDetail/AlbumComment",
                name: "albumComment",
                component: AlbumComment
            },
            {
                path: "/AlbumDetail/AlbumDetailDesc",
                name: "albumDetailDesc",
                component: AlbumDetailDesc
            }
        ]
    },
    {
        path: "/VideoDetail/:id",
        name: "videoDetail",
        component: VideoDetail
    },
    {
        path: "/MVRanking",
        name: "mVRanking",
        component: MVRanking
    },
    {
        path: "/AllMV",
        name: "allMV",
        component: AllMV
    },
    {
        path: "/Search",
        name: "search",
        component: Search,
        children: [
            {
                path: "/Search",
                name: "single",
                component: Single
            },
            {
                path: "/Singer_Search",
                name: "singer_Search",
                component: Singer_Search
            },
            {
                path: "/Album_Search",
                name: "album_Search",
                component: Album_Search
            },
            {
                path: "/Video_Search",
                name: "video_Search",
                component: Video_Search
            },
            {
                path: "/SongList_Search",
                name: "songList_Search",
                component: SongList_Search
            },
            {
                path: "/Lyric_Search",
                name: "lyric_Search",
                component: Lyric_Search
            },
            {
                path: "/Podcast_Search",
                name: "podcast_Search",
                component: Podcast_Search
            },
            {
                path: "/Sound",
                name: "sound",
                component: Sound
            },
            {
                path: "/User",
                name: "user",
                component: User
            }
        ]
    }
]


const router = createRouter({
    history: createWebHistory(),
    routes
})

export default router
